from typing import List

from ninja_schema import ModelSchema

from .models import Area


class AreaSchema(ModelSchema):
    class Config:
        model = Area
        include = ['id', 'name']


class AreaSubsSchema(ModelSchema):
    subs: List[AreaSchema]

    class Config:
        model = Area
        include = ['id', 'name', ]

